package com.yiwenup.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * DemoController
 **/
@RestController
@RequestMapping("demo")
@Slf4j
public class DemoController {

    @Value("${yiwenup.demo}")
    private String demoText;
    @Value("${db.config}")
    private String db;

    @GetMapping("/hello")
    public String hello() {
        log.info("hello info log...");
        log.debug("hello debug log...");
        log.error("hello error log...");
        log.warn("hello warn log...");
        return "hello world!" + demoText;
    }
}
